package com.laiketui.plugin.common.mapper;

import com.laiketui.plugin.common.domain.base.seckill.SecondsDayDeleteModel;
import com.laiketui.plugin.common.tool.db.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Trick
 */
public interface SecondsDayDeleteModelMapper extends BaseMapper<SecondsDayDeleteModel> {


    /**
     *  获取被删除的天数
     * @author Trick
     * @date 2021/5/8 9:49
     * @param aid - 活动id
     * @return List
     */
    @Select("SELECT distinct day FROM lkt_seconds_day_delete  WHERE activity_id = #{aid} and day not in(SELECT DISTINCT left(add_time,10)  " +
            " FROM `lkt_seconds_record` WHERE is_delete = 0 and sec_id = #{aid}) order by day desc")
    List<String> getSecondsDayDel(int aid);
}